//
//  WMPackageListModel.swift
//  deWaterMarkingProject
//
//  Created by admin on 2025/9/8.
//

import UIKit

struct WMPackageListModel: Identifiable, Codable {
    var attr: String?
    var button: String?
    var defaultshow: Int?
    var describ: String?
    var id: Int?
    var message: String?
    var money: Int?
    var name: String?
    var original: String?
    var prodid: String?
    var warn: Bool?
    
    init?(json: [String: Any]) {
        guard let prodid = json["prodid"] as? String else { return nil }
        self.prodid = prodid
        
        guard let attr = json["attr"] as? String else { return nil }
        self.attr = attr
        guard let button = json["button"] as? String else { return nil }
        self.button = button
        guard let describ = json["describ"] as? String else { return nil }
        self.describ = describ
        guard let message = json["message"] as? String else { return nil }
        self.message = message
        guard let name = json["name"] as? String else { return nil }
        self.name = name
        guard let original = json["original"] as? String else { return nil }
        self.original = original
        
        self.defaultshow = json["defaultshow"] as? Int ?? 0
        self.id = json["id"] as? Int ?? 0
        self.money = json["money"] as? Int ?? 0
        self.warn = json["warn"] as? Bool ?? false
        
        // 初始化其他属性...
    }
}
